package edu.ahut.designpattern.strategy;

public class Context {
    public void setSortAlgorithm(SortStrategy sortAlgorithm) {
        this.sortAlgorithm = sortAlgorithm;
    }

    private SortStrategy sortAlgorithm;

    public Context(SortStrategy sortAlgorithm) {
        this.sortAlgorithm = sortAlgorithm;
    }

    public void executeStrategy(int[] arr) {

        sortAlgorithm.sort(arr);
    }
}